import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: HP
 * Date: 2023 -04 -04
 * Time: 22:06
 */
class Complex1 {
    private int a;
    private int b;

    public Complex1() {
        a = 0;
        b = 0;
    }

    public Complex1(int a, int b) {
        this.a = a;
        this.b = b;
    }

    public Complex1 add(Complex1 c) {
        int ra = a + c.a;
        int rb = b + c.b;
        return new Complex1(ra, rb);
    }

    public Complex1 sub(Complex1 c) {
        int ra = a - c.a;
        int rb = b - c.b;
        return new Complex1(ra, rb);
    }

    public Complex1 mutil(Complex1 c) {
        int ra = a * c.a - b * c.b;
        int rb = b * c.a + a * c.b;
        return new Complex1(ra, rb);
    }

    public Complex1 div(Complex1 c) {
        int ra = (a * c.a + b * c.b) / (c.a * c.a + c.b * c.b);
        int rb = (b * c.a - a * c.b) / (c.a * c.a + c.b * c.b);
        return new Complex1(ra, rb);
    }

    public void print() {
        System.out.println(a + "+" + b + "i");
    }

    public static void main(String[] args) {
        while (true) {
            Scanner sc = new Scanner(System.in);
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            int d = sc.nextInt();
            Complex1 c1 = new Complex1(a, b);
            Complex1 c2 = new Complex1(c, d);
            c1.add(c2).print();
            c1.sub(c2).print();
            c1.mutil(c2).print();
            c1.div(c2).print();
        }
    }
}


